import java.util.Scanner;
    public class test {
        //输出n*n的乘法口诀表，n由用户输入。
        public static void main(String[] args) {
           Scanner scanner = new Scanner(System.in);
            int n = scanner.nextInt();
            int i = 0;
            for (i = 1; i <= n; i++) {
                int j = 0;
                for (j = 1; j <= i; j++) {
                    System.out.print(i + "*" + j + " = " + i * j);
                    System.out.print(" ");
                }
                System.out.println();
            }
        }

        public static void main8(String[] args) {
            Scanner scanner = new Scanner(System.in);
            int i = 0;
            while(i<3)
            {
                String a = scanner.nextLine();
                if(a.equals("123456789")){
                    System.out.println("输入正确");
                    break;
                }
                else{
                    System.out.println("输入错误，请重新输入");
                    i++;
                }
            }
            if(i==3)
            {
                System.out.println("错误三次！");
            }
        }

        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            int a = scanner.nextInt();
            int i = 32;
            int num = 0;
            for(i=31;i>=0;i--){
                int ret = (a>>i)&1;
                if(ret==1){
                    num++;
                }
            }
            System.out.println(num);

            public static void main(String[] args) {
                Scanner scanner = new Scanner(System.in);
                int a = scanner.nextInt();
                int a1 = a;
                System.out.println("偶数位");
                for (int i = 31; i >= 0; i-=2) {
                    int ret = (a>>>i)&1;
                    System.out.print(ret+" ");
                }
                System.out.println();
                System.out.println("奇数位");
                for (int i = 30; i >= 0; i-=2) {
                    int ret = (a1>>>i)&1;
                    System.out.print(ret+" ");
                }

            }

            public static void main6(String[] args) {
                Scanner scanner = new Scanner(System.in);
                int a = scanner.nextInt();
                int b = scanner.nextInt();
                int c = 0;
                while(a%b!=0){
                    c = a%b;
                    a=b;
                    b=c;
                }
                System.out.println(b);
            }

            public static void main5(String[] args) {;
                for (int i = 100; i < 1000; i++) {
                    int ret = i;
                    int a = ret % 10;
                    int b = (ret/10)%10;
                    int c = ret/100;
                    int pd = a*a*a+b*b*b+c*c*c;
                    if(pd == i) {
                        System.out.println(i);
                    }
                }
            }

            public static void main(String[] args) {
                Scanner scanner = new Scanner(System.in);
                int age = scanner.nextInt();
                if(age>=0&&age<18){
                    System.out.println("少年");
                }
                else if(age>18&&age<=28)
                {
                    System.out.println("青年");
                }
                else if(age>=28&&age<=55)
                {
                    System.out.println("中年");
                }
                else{
                    System.out.println("老年");
                }
            }


            public static void main(String[] args) {
                Scanner scan = new Scanner(System.in);
                int PrimeNumber = scan.nextInt();
                int flag = 0;
                for (int i = 2; i < PrimeNumber; i++) {
                    if(PrimeNumber%i==0) {
                        flag = 1;
                        break;
                    }
                }
                if(flag==0){
                    System.out.println(PrimeNumber);
                }
                else{
                    System.out.println("noPrimeNumber");
                }
            }

            public static void main2(String[] args) {
                int i = 0;
                for(i=1;i<=100;i++) {
                    int flag = 0;
                    int j = 0;
                    for(j=2;j<=i-1;j++) {
                        if(i%j==0) {
                            flag = 1;
                            break;
                        }
                    }
                    if(flag==0){
                        System.out.println(i);
                    }
                }
            }
        }

        public static void main(String[] args) {
            int year = 0;
            System.out.println("leapyear:");
            for(year=1000;year<=2000;year++)
            {
                if((year%4==0&&year%100!=0)||year%400==0)
                {
                    System.out.println(year+" ");
                }
            }
        }


}